package com.marquisx.tzdice.model;

import java.util.Calendar;
import java.util.Date;

import com.marquisx.tzdice.Constants.RecordType;

public class DiceRecord
{
	public final int NO_PROFILE = -1;
	
	/** The id of the dice record */
	private long id;
	/** The user's name who creates this dice record */
	private String username = "";
	/** The user's profile picture id */
	private int userProfileId = NO_PROFILE;
	/** The record type */
	private RecordType type;
	/** The record content */
	private String content;
	/** The record result ONLY available when type is roll */
	private String result;
	/** The time stamp of creating this dice record */
	private Date timeStamp;// = Calendar.getInstance().getTime();

	public DiceRecord(RecordType type)
	{
		this.type = type;
		timeStamp = Calendar.getInstance().getTime();
	}
	
	public void copy(DiceRecord record)
	{
		this.id = record.getId();
		this.username = record.getUsername();
		this.userProfileId = record.getUserProfileId();
		this.type = record.getType();
		this.content = record.getContent();
		this.result = record.getResult();
	}

	public long getId()
	{
		return id;
	}

	public void setId(long id)
	{
		this.id = id;
	}

	public String getUsername()
	{
		return username;
	}

	public void setUsername(String username)
	{
		this.username = username;
	}

	public int getUserProfileId()
	{
		return userProfileId;
	}

	public void setUserProfileId(int userProfileId)
	{
		this.userProfileId = userProfileId;
	}

	public RecordType getType()
	{
		return type;
	}

	public void setType(RecordType type)
	{
		this.type = type;
	}

	public String getContent()
	{
		return content;
	}

	public void setContent(String content)
	{
		this.content = content;
	}

	public Date getTimeStamp()
	{
		return timeStamp;
	}
	
	
	public String getResult()
	{
		return result;
	}

	public void setResult(String result)
	{
		this.result = result;
	}
}
